improve: naming on ResourceID API#3151
improve: naming on ResourceID API#3151csviri wants to merge 1 commit intooperator-framework:nextfrom
Conversation
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
| * @since 5.3.0 | ||
| */ | ||
| public boolean isSameResource(String name, String namespace) { | ||
| public boolean equals(String name, String namespace) { |
There was a problem hiding this comment.
I don't think that equals is a better name (because equals has a special meaning in Java and it doesn't quite match here), though I agree that isSameResource is not great either… maybe equilaventTo? This way, it would be somewhat discoverable if someone is looking for equality-like methods?
There was a problem hiding this comment.
Yes, I though overloaded would be too much an issue, but you might be right that naming wise this could raise some eyebrows.
| return Objects.equals(name, that.name) && Objects.equals(namespace, that.namespace); | ||
| } | ||
|
|
||
| public boolean isSameResource(HasMetadata hasMetadata) { |
There was a problem hiding this comment.
This would technically be an API break.
There was a problem hiding this comment.
That is true, so not sure to how extent we consider this as an internal API, but since users use this with customt SecondaryToPrimaryMapper it might be an issue.
|
Ok, considering this we probably don't want to break this API will close this. |
Signed-off-by: Attila Mészáros a_meszaros@apple.com